<?php

declare(strict_types=1);

namespace app\admin\controller;

use app\admin\controller\Base;
use think\Request;

class RegionCountry extends Base
{
    protected $request;
    protected $service;
    protected $validate;
    protected $operator_id;

    public function __construct(Request $request)
    {
        $this->request = $request;
        $this->service = new \app\admin\service\RegionCountry();
        // $this->validate = new \app\admin\validate\Customer();

        $this->operator_id = $request->operator_id;
    }

    /**
     * @describe
     * @author: Bobo
     * @date: 2024-09-29 14:41:31 
     * @param [type] @required
     * @return Renderable
     */
    public function selectOption()
    {
        $params = $this->request->params;

        $res = $this->service->selectOption($params);

        $code = $res['code'];
        $data = $res['data'];
        $message = $res['message'] ?? "";
        return $this->returnJsonData($code, $data, $message);
    }
}
